<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>报销申请</title>
		<script src="js/mui.min.js"></script>
		<script type="text/javascript" src="../js/jquery.min.js" charset="utf-8"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link href="../css/reimbursementDetalis.css" rel="stylesheet" />
		<script type="text/javascript" charset="utf-8">
			$(function() {
				var userId = localStorage.getItem("userId");
				var tpiId = localStorage.getItem("tpiId");
				var token = localStorage.getItem("token");
				var ip = localStorage.getItem("ip");
				$.ajax({
					type: 'post', //类型
					url: ip + 'workFlow/details', //请求路径
					contentType: 'application/x-www-form-urlencoded', //默认
					dataType: 'json', //返回数据类型  可以是text：字符串  可以是json：json对象
					data: {
						'userId': userId,
						'taskprocessInstanceId': tpiId,
						'token': token,
					}, //数据
					success: function(result) {
						if(result.code == 200){
							document.getElementById('userName').innerText = result.data.userName;
							document.getElementById('money').innerText = result.data.money;
							document.getElementById('notes').innerText = result.data.notes;
							document.getElementById('reason').innerText = result.data.reason;
							document.getElementById('createTime').innerText = result.data.createTime;
							document.getElementById('statusName').innerText = result.data.statusName;
							var imagePath = result.data.imagePath;
							var imagePathArray = imagePath.split(',');
							var txts = "";
							for (var Key in imagePathArray) {
								txts = txts + '<img src="'+imagePathArray[Key]+'" style="width: 30%; height: 80px;" />';
							}
							$(".imgdiv").append(txts);
						} else {
							alert('获取数据异常,请重新登录');
							//window.location.href = 'Login.html';
						}
					},
					error: function(data) { //若果传过来的数据为空
					}
				});
			});
		</script>
	</head>

	<body style="background: #d9d9d9;">
		<div style=" background: white; width: 90%; margin-left: 5%;margin-top: 10%; box-shadow:1px 2px 1px 1px #aaa;-webkit-border-radius: 10px;">
			<br />
			<font>报销人：</font>
			<font id="userName">李豆豆</font><br/><br />
			<font>报销额：</font>
			<font id="money">100000</font><br/><br />
			<font>报销描述：</font>
			<font id="notes">李豆豆</font><br /><br />
			<font>报销用途：</font>
			<font id="reason">李豆豆</font><br /><br />
			<font>申请时间：</font>
			<font id="createTime">李豆豆</font><br /><br />
			<div class="imgdiv" style="margin-left: 5%;">
			</div><br />
			<font id="statusName">报销状态</font><br /><br /><br />
			<!--<input type="button" value="同意" style=" font-size: calc(17vw/3.75); -webkit-border-radius: 10px; width: 40%;height: 40px;margin: 5%; margin-bottom:15%;background: #33ff99;color: white;" />
		<input type="button" value="拒绝" style=" font-size: calc(17vw/3.75); -webkit-border-radius: 10px; width: 40%;height: 40px;margin: 3%;background: #33ff99;color: white;"/>-->
		</div>
	</body>

</html>